#ifndef TEMPLATE_H
#define TEMPLATE_H
#include <iostream>
#include <string>

using namespace std;

class MakeCar{
public:
    virtual ~MakeCar(){
    }
    virtual void makeHead()=0;
    virtual void makeBody()=0;
    virtual void makeTail()=0;
public:
    void make(){
        //一些统一的操作步骤
        makeHead();
        makeBody();
        makeTail();
    }
};

class Bus:public MakeCar{
public:
    void makeHead(){
        cout<<"bus make head"<<endl;
    }
    void makeBody(){
        cout<<"bus make body"<<endl;
    }
    void makeTail(){
        cout<<"bus make tail"<<endl;
    }
};

class Jeep:public MakeCar{

public:
    void makeHead(){
        cout<<"jeep make head"<<endl;
    }
    void makeBody(){
        cout<<"jeep make body"<<endl;
    }
    void makeTail(){
        cout<<"jeep make tail"<<endl;
    }
};


#endif // TEMPLATE_H
